import request from '@/utils/request'

const api = {
    actionList: '/action/list',
    addAction: '/action/add',
    editAction: '/action/edit',
    removeAction: '/action/remove',
    getTree: '/action/tree'
  }

  export function actionList (parameter) {
    return request({
      url: api.actionList,
      method: 'post',
      data: parameter
    })
  }

  export function addAction (parameter) {
    return request({
      url: api.addAction,
      method: 'post',
      data: parameter
    })
  }

  export function editAction (parameter) {
    return request({
      url: api.editAction,
      method: 'post',
      data: parameter
    })
  }

  export function removeAction (parameter) {
    return request({
      url: api.removeAction,
      method: 'post',
      data: parameter
    })
  }

  export function getTree (parameter) {
    return request({
      url: api.getTree,
      method: 'post',
      data: parameter
    })
  }
